package toanstt.com;

import android.util.Log;

public class Vibrator 
{
	int dx;
	int dy;
	int onupdate=0;
	int temp;
	int level;
	public void DoVibrator(int _level)
	{
		level = _level;
		onupdate = 5;
		dx = dy  =0;
	}
	public void Update()
	{
		if(onupdate==0)
			return;
		if(onupdate==1)
		{
			T.GAMESCREEN_MIN_X+= -dx;
			T.GAMESCREEN_MIN_Y+= -dy;
		}
		else
		{
			temp = T.random.nextInt(level) - (level-1)/2;
			dx+= temp;
			T.GAMESCREEN_MIN_X+= temp;
			
			temp = T.random.nextInt(level) - (level-1)/2;
			dy+= temp;
			T.GAMESCREEN_MIN_Y+= temp;
			
			Log.d("AddCell",""+temp);
		}
		onupdate--;
	}
}
